-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A number of (mostly/all nerd-) fonts have broken paths #40
Comments
Hello, 13steinj. As I'm sure you've experienced, until you unzip a zip file, it's hard to tell whether the contents of the zip file are well organised into a single directory, or just an archive file with several files flattened out. A few years ago, this problem was encountered in extracting zip files. Therefore, we had to change to such a FORMULA. But today you have pointed out that it is time to change the treatment of similar zip files again. I know how to fix it. As you have noticed, the auto-generated scripts need to be improved. homebrew-linux-fonts/cask2formula Lines 97 to 105 in 5107db3
If you are in a hurry, please fix this and send me a PR. I will be happy to review it. I will also make time over the weekend to fix it. Thank you very much. |
Not in a hurry, might not have the time to fix it before you do. Thank you for the prompt response! |
Could the formula generator be changed to read the entries in the zip file and install those, rather than hard-coding the path transformation? |
FYI it appears as though this has been fixed with some nerd fonts since my original issue based on commit history; but with at least the reported one, still a problem. I can pick this up over the weekend if you don't have the time, just say the word! Just don't want to unintentionally step on toes. |
Thank you for reporting this issue and sharing your insights. The problem with specifying the actual font files in the formula arises due to the nature of zip archives containing font files. Many fonts are distributed as zip files, which can either contain neatly organized directories or have files scattered flatly in the root directory. This inconsistency makes it challenging to specify paths accurately without extracting the zip file first. To address this, I have implemented a change that uses glob patterns to match the font files, regardless of the directory structure within the zip file. By using glob('**/*.ttf') and similar patterns, we can capture the font files whether they are in the root directory or within subdirectories. This approach reduces the risk of missing fonts due to path specification issues. However, there is a minor concern that this method might accidentally include font files located in very deep directories. Based on our experience, font distribution files usually do not have such deep directory structures, so this risk is minimal. Additionally, I have replaced the use of class variables with simple global variables in the implementation. This change aims to reduce bugs and simplify the code. While this approach does not support parallel processing, we plan to implement instance variables in the future to enable parallelism. This will be addressed in future updates. I hope this solution resolves the issues you've encountered. If there are any further problems or questions, please let me know. Thank you for your understanding and cooperation. |
General troubleshooting steps
--force
and the issue is still present.brew update-reset && brew update
and retried my command.brew doctor
, fixed as many issues as possible and retried my command.Description of issue
I stepped away from a linux install in which I have installed many fonts. I have come back, and did a
brew update && brew upgrade
. I kept running into errors with the font packages. I stepped away again, because I didn't have time to bother debugging.On a new linux machine, with a fresh-ish homebrew installation--
brew install ont-ubuntu-mono-nerd-font
fails. Looking at the zip, the paths of the fonts are wrong.Example fix for the above mentioned font:
It is similarly possible that not all fonts are installed (I haven't checked this zip, nor others).
I'd submit PRs but wanted to make an issue first because:
Output of your command with
--verbose --debug
Output of
brew cask doctor
lol part 1
lol part 2, methinks the template needs some updating ;)
The text was updated successfully, but these errors were encountered: